﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ZFB.Common;

namespace ZFB.IServices
{
    public interface IHouseAppointmentsServices
    {
        /// <summary>
        /// 新增一个预约用户
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="name"></param>
        /// <param name="phoneNum"></param>
        /// <param name="houseId"></param>
        /// <param name="visitDate"></param>
        /// <returns></returns>
        Task<ApiResult> AddNewAsync(long? userId,string name,string phoneNum,long houseId,DateTime visitDate);
        /// <summary>
        /// 乐观锁解决并发
        /// </summary>
        /// <param name="adminUserId"></param>
        /// <param name="huoseAppointmentId"></param>
        /// <returns></returns>
        Task<ApiResult> Follow(long adminUserId, long huoseAppointmentId);
        /// <summary>
        /// 根据Id获取
        /// </summary>
        /// <returns></returns>
        Task<ApiResult> GetByIdAsync(long id);
        /// <summary>
        /// 得到城市中状态status的预约数
        /// </summary>
        /// <returns></returns>
        Task<ApiResult> GetToTalCountAsync(long cityId,string status);
        /// <summary>
        /// 分页获取
        /// </summary>
        /// <param name="cityId"></param>
        /// <param name="status"></param>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        Task<ApiResult> GetPageDateAsync(long cityId, string status, int page, int limit);
    }
}
